import component from "element-plus/es/components/tree-select/src/tree-select-option.mjs";
import path from "path";
import {createRouter,createWebHashHistory} from "vue-router";
//指定路由规则


const routes = [
    {
        path: '/',
        name: 'main',
        component: () => import('@/views/Main.vue'),
        //添加重定向
        redirect: '/home',
        //添加子路由
        children: [],
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/Login.vue')
    },
    {
        path: '/404',
        name: '404',
        component: () => import('@/views/404.vue')
    },

]

const router = createRouter({
    //设置路由模式
    history:createWebHashHistory(),
    routes,
});

export default router;